package com.itheima.Demo2;

import java.sql.SQLOutput;
import java.util.ArrayList;

public class StreamDemo4 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add(i);
        }

//        list.stream().filter(
//                (Integer i) -> {
//                    return i % 2 == 0;
//                }).forEach(s -> System.out.println(s));
//
//        System.out.println("=============");
//
//        list.stream().filter(number -> number%2 == 0).forEach(s -> System.out.println(s));

    }
}
